package com.minesweeper.ui;

import javax.swing.*;

/**
 * @author skniy
 */
public class Block extends JLabel {
    /**
     * 行数
     */
    public int row;
    /**
     * 列数
     */
    public int col;
    /**
     * 标记,0为无标记，1为地雷，2为未知
     */
    public int flag;
    /**
     * 周围地雷数目,-1为地雷周边的地雷数目
     */
    public int localMineCount;
    /**
     * 地雷状态
     */
    public boolean mineStatus;
    /**
     * 用户标记的状态
     */
    public boolean flagStatus;
    /**
     * 点击状态
     */
    public boolean clickStatus;

    /**
     * 构造方法
     *
     * @param row
     * @param col
     */
    public Block(int row, int col) {
        this.row = row;
        this.col = col;
        this.flag = 0;
        this.localMineCount = -1;
        this.mineStatus = false;
        this.flagStatus = false;
        this.clickStatus = false;
    }
}
